package com.ht.config;


import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000119675260";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCyIbjj0oQKj8Qpu/okHEBq8mH12T7NUT8FW3TQ99K2geEGPQh2tjIbdFAYYhLOqe+RuHBV836oK2v1IVbk4Kr4vm4x19ndgdpOGa0LsEIl6v290TmMO+d/YB19ZySLiSS/dVe1fakt0EZy3R0Xgg4W1fKqNnSe4aq6cCaPgvzYomPcYYGkiytzAAYPZy9CQ51QyB12c0xpvkStvBsOCl2fhmDo60e2ZyK95NZWlKWq6y4wS71tp63ZF8qJeG4l5psdWB/D7VTsfFge+kdtOz34j3AgRUamlLVfz0ThWSHGSqKQlg2GSnJGTXgMhg3VT6NCuzw/D1M+RO0COBE58VHPAgMBAAECggEAQU/F95ovGaQ+u0KV43mMUOoP6tE9ipA4eCFhQmErHAmg1OW53bTNyG0sFNSYqrd6BEbIwWrmzIgnLBiOQJrzdQJ1ascGtYWv4iTd4sQ8bKStZlR5MiagqX43McyIhLTDCYPfpcauKgMMYX8a9IyV19+X+rq+paZ+L5+BM+tGA7NhJ56+vVmpXDDlXyT6IxSkOFQHQz4DaHbTwHNuB+yVUyp/BrWKriCIU7POmDcN8ng6Q71dULZ908XrBM9II2BD/c+v5zzfAw6esns0dex8hEa9O8m901p3ic/gL6PJ80Ryu61j4GzUGarrJJPvA1xAltOp70FRY3FSknpO2qu0iQKBgQDvS7UZgL7PbbSfG+fwKC53eVR/58zazvoCmWa8jHhvqeNb6OdTQQ0W5aZnMpjHbeue8bB3fvhwsrM9YHcHO9h+cggUtvP6kdiGxAJYomyBmCVA5tpweRq5L2sFPkKkxQLy5aFTuGKnCpgAl+qQeLjAh0zB74JNML6YoAR4wsvm8wKBgQC+kP6AR8LeuRXRd6SbOYDE7KOt2BABWeHtOBB6Aq1Dtu4ziJzCFIRj6A18ya+gunSa3kHwxpirGt47CHG8dQ0FeZ270bhUhvavhI/bQy9yQAONEWQr5aVAVp+ndqP24kB+sOOJCztYkmNOfIL9hg/RQlPCtvxhge5f2WXABe7YtQKBgHAJZjUWjj/YAWUtT56lcXwGloV8JfGcTnnBENTef9ToGccCeKwGHPbHdu2CRv24fUThq9mG3RMG19y4uYHthyNMiHQKZJjAiDwwsViGU38pmOeWLlfSm6xwgw7lY5Z5lzPaR3pHLgk/cIN2nSAfJYEe19VFKiCx3crfwLg5m/X5AoGAKzrTMSCWWVYdV/ZPNhNWXdXcz6wK/XN5aAnm2vbOfWT7Jl+gR/rFibBzltJd8BU8LIGs7cTvjyk6LqQcwQbAnHRZTuklaq9vOKPWyoO0OLPC2naOhdLDqRO9hgzI51GuFc9k3orYvKAAvSZLxN1rqynjvHEsUaZbAA1eIrB13V0CgYAZha2LPyw7sfqU8ioSNlP4gl6o/aORGAgGYSbREhXg7Fg2IrmArtUjftZi/vR8F1LH4AJPuHIow1g6bgaPrPPdL5M/cOY9WadKK7iOKTERPcRbOX3Pd+mf45IEYF8mUha/5VubQbMxsdrGV1S01VZopnt8c1SzUzWqQioqWG4x2Q==";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhnP4fg8JWPgHrDWkiD/W8fh//9gh5Thd+p4WEuIB8pWsK0AYTw2A8G0Hpqd71TNiRibJlBTHEZLLaOImK2hu5I6YLd/CsRZAUuwEREGXcvb6qIE7MLcFxPXz9vyUg6N+l91bopbPdEHL+bsE7aXamsqs7x2t01u/TOJYjs3sY3pOgWBRBuABqUM9lDj813+4QnD7JCRfndwEoDLlXcAe+1CTei3To4Q8kg21RAra71Qx3dKRsmNS4b8g/ySYKyxKISH8q0dJv9vV3PBDI8NM3N1jRjZ9NPf9ZND7WDElBbpHRKLZoC3g94pX+Y9O+Et5Kcs3FeDR+MKpcAOiweuoqQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://d476s78223.zicp.vip/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://d476s78223.zicp.vip/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
